package com.loie.datacenter.service.impl;

import com.loie.datacenter.mapper.CommissionMapper;
import com.loie.datacenter.model.bo.CommissionBO;
import com.loie.datacenter.model.bo.CommissionItemBO;
import com.loie.datacenter.model.bo.CommissionItemSumBO;
import com.loie.datacenter.model.bo.CommissionWithItemBO;
import com.loie.datacenter.service.CommissionService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author zhl
 * @create 2021/10/2 00:38
 */
@AllArgsConstructor
@Transactional(readOnly = false)
@Service("commissionService")
public class CommissionServiceImpl implements CommissionService {
    final CommissionMapper commissionMapper;

    @Override
    public
    CommissionItemSumBO getCommissionItemSum(CommissionItemBO bo) {
        return commissionMapper.getCommissionItemSum(bo);
    }

    @Override
    public List<CommissionBO> getCommissionList(CommissionBO bo, String user) {
        return commissionMapper.getCommissionList(bo, user);
    }

    @Override
    public List<CommissionItemBO> getCommissionItemList(CommissionItemBO bo) {
        return commissionMapper.getCommissionItemList(bo);
    }

    @Override
    public
    CommissionItemSumBO getCommissionCount(CommissionBO bo, String user) {
        return commissionMapper.getCommissionCount(bo, user);
    }

    @Override
    public List<CommissionWithItemBO> getCommissionWithItemList(CommissionBO bo, String user) {
        return commissionMapper.getCommissionWithItemList(bo, user);
    }
}
